# !/usr/bin/env python
# coding=utf-8
# @Time    : 2017/12/21 16:09
# @Author  : 6imensiva
# @Site    : https://gitee.com/dimensiva/wx_server_prototype.git
# @File    : user_service.py
# @Software: PyCharm
# @Version: 3.5.4
from flask import request
from configs import current_config
from . import api
from app.service import user_service, token_service


@api.route(current_config.API_PREFIX + '/user/info', methods=['GET'])
def get_user_info():
	token = request.args.get('web_access_token')
	# token = token_service.get_server_access_token2(False)
	openid = request.args.get('openid')
	return user_service.get_user_info(token, openid)